package com.baishancloud.log.quality.core

import com.baishancloud.log.common.env.StreamEnv
import com.baishancloud.log.common.source.SourceUtil
import com.baishancloud.log.quality.{MobileTerminal, businessLive}
import org.apache.flink.api.java.utils.ParameterTool
import org.apache.flink.streaming.api.scala.DataStream

/**
 * 移动直播质量指标分析
 *
 * @author ziqiang.wang
 * @date 2021/11/16 16:17
 */
object MobileLiveQuality extends Serializable {


  def main(args: Array[String]): Unit = {
    val parameterTool: ParameterTool = ParameterTool.fromArgs(args)
    println("输入参数：" + parameterTool.toMap.toString)
    StreamEnv.builder(parameterTool).build()

    val mobileLive: DataStream[String] = SourceUtil.kafkaOnlyValue(parameterTool).uid("06b89aa7-36b7-4bbc-9f7f-41e6f375e54a")
    MobileTerminal.mobileTerminal(parameterTool, businessLive, mobileLive)

    StreamEnv.execute(parameterTool)
  }

}
